package Designpatterns.buyers;

import org.apache.log4j.Logger;
import org.junit.Test;

public class BuyerTest {
    private Logger logger = Logger.getLogger(BuyerTest.class);
    @Test
    public void test1() {
        Buyer buyer = new IntermediaryImpl(new RealBuyer());
        String result = buyer.havealook();
        logger.debug(result);
    }
    @Test
    public void test2() {
        RealBuyer buyer= new IntermediarySubclass();
        String result = buyer.havealook();
        logger.debug(result);
    }
    @Test
    public void test3(){
        Buyer buyer = IntermediaryJdkProxyFactory.create(new RealBuyer());
        String result = buyer.havealook();
        logger.debug(result);
    }
}
